#ifndef LINKED_QUEUE_H
#define LINKED_QUEUE_H

#include <stdbool.h>

#define MAX_INFO_LENGTH     21
#define MAX_QUEUE_LENGTH    10

typedef struct {
    int id;
    char info[MAX_INFO_LENGTH];
} UserInfo_t;

typedef struct QueueNode_t {
    UserInfo_t data;
    struct QueueNode_t *next;
} QueueNode_t;

typedef struct {
    QueueNode_t *front;
    QueueNode_t *rear;
} LinkedQueue_t;

typedef enum {
    LINKED_QUEUE_SUCCESS,
    LINKED_QUEUE_FAIL,
}LinkedQueueStatus_t;

LinkedQueueStatus_t LinkedQueueInit(LinkedQueue_t *queue);
bool LinkedQueueIsEmpty(const LinkedQueue_t *queue);
LinkedQueueStatus_t LinkedQueueIn(LinkedQueue_t *queue, const UserInfo_t *data);
LinkedQueueStatus_t LinkedQueueOut(LinkedQueue_t *queue, UserInfo_t *data);
LinkedQueueStatus_t LinkedQueueGetFront(const LinkedQueue_t *queue, UserInfo_t *data);
void LinkedQueueDestroy(LinkedQueue_t *queue);

#endif
